//
//  DAOUser.m
//  XMDLearn
//
//  Created by apple on 16/4/12.
//  Copyright © 2016年 hao. All rights reserved.
//

#import "DAOUser.h"

@implementation DAOUser

-(void)loginWithphoneNumber:(NSString *)phoneNumber passWord:(NSString *)passWord successHandler:(void(^)(User *user))successBlock errorHandler:(void(^)(NSString *code,NSString *message))errorBlock{
    
    NSString *url = @"http://192.168.1.153/userlogin.ashx";
    
    NSDictionary *parames = @{@"cellphone":phoneNumber,@"psw":passWord};
    
    [self post:url parameters:parames dataModel:[User class] successHandler:^(id model) {
        
        NSLog(@"asdasdasdasdas");
        
        if (successBlock != nil) {
            successBlock(model);
        }
    } errorHandler:errorBlock];
}

@end
